package admin

import (
	"server/framework/ueditor"
	"server/lib/Imartini"
	"server/web/handler/shop/admin/auth"
	// "log"
	// "net/http"
)

var base = "admin"
var route = [][]interface{}{
	{"", "GET", "/ueditor.config.js", ueditor.Ueditor_config},
	{"", "GET", "/controller.php", ueditor.Controller},
	{"", "POST", "/controller.php", ueditor.Controller},
	{"admin/index", "GET", "", auth.Auth, index},
	{"admin/login", "GET", "/login", auth.Login},
	{"admin/plogin", "POST", "/login", auth.PLogin},
	{"admin/register", "GET", "/register", auth.Register},
	{"admin/pregister", "POST", "/register", auth.PRegister},
}

func init() {
	Imartini.M.AddIroute(base, route)
	// Imartini.M.AddRoute("GET", "/js/", http.FileServer(http.Dir("/var/www/js/")))
	// log.Println(Imartini.M.Iroute)
}
